Static limits
This is a list of static limitations of the vanilla Doom engine. Visplanes The most famous limit of them all, there are 128, and each one represents a unique combination of floor or ceiling height, light level, and texture present in a rendered scene. In the worst case each subsector will generate at least two visplanes if its floor and ceiling are in view, but these may be merged -or split- as the game engine draws the scene. The only ways to get rid of this are to make your level less detailed in areas visible from the spot it happens, add sight-obstructing walls, or move areas up or down vertically so that the floors or ceilings are not visible. Vissprites Doom will not draw more than 128 sprites at one time. If you have too many, the extra ones will flicker in and out of view, depending on the sorting order. In fact the same thing could happen in the SNES version of Doom (Because the SNES also has a limit of 128 sprites on-screen) but in none of the vanilla levels is that possible and would probably make the game's FPS slow down to crawl anyway. Drawsegs Doom will not render more than 256 segs (128 in earlier versions) in a single scene. The rest will become HOM. Doom draws from front to back, so the furthest lines away from the player will typically disappear first. Blockmap The blockmap for a vanilla map cannot exceed 65536 bytes in size. Even a relatively simple map with only 4 linedefs can exceed the blockmap limit if it is made to cover enough area, because the size of the blockmap is a function of both the number of linedefs in the map, and the amount of area it covers in 128x128 blocks. Maps that exceed the blockmap limit can crash vanilla Doom. Segs/sides/lines/subsectors/nodes The number of none of these things can exceed 32768 due to hard data type size limits in the map format. Practically speaking, the segs limit is always the first one hit, and thus imposes an even more stringent limit on the other entities, of which the number of segs is partially a function. Plats & ceilings Only 30 platform actions can be active at one time. Exceeding this limit will cause a bomb-out with error message. There can also only be 30 active ceiling effects at a time, and if this limit is exceeded, the map can behave strangely. Buttons If more than 16 switches are activated at once, the game will bomb out. Spechits Crossing more than 8 special linedefs in a single tic will cause an internal overflow, and undefined behavior will result. Intercepts If a bullet tracer crosses too many things and lines (more than 128), an internal overflow will happen, causing undefined behavior. This sometimes results in the bug known as "all-ghosts". Savegame Savegames are limited in size to around 180 KB. If the saved memory footprint of your map is larger than this, including because of dynamically spawned objects such as missiles or monsters spawned by the final boss, the game will bomb out. Openings/Solidsegs The number of alternating regions of solid and transparent linedefs have some esoteric limits. If this exceeded, for instance with too many fenceposts, the game will crash. Scrollers Having more than 64 scrolling lines will either bomb out or crash. Adjoining sectors Only up to 20 adjoining sectors are considered for effects such as "floor raise to next highest floor". Coordinates Because of the fixed-point format used by Doom, the integral part of coordinates is effectively a signed 16-bit number, restricted to values between -32767 and 32767. Greater values simply cannot be expressed. This amplitude restriction concerns both absolute and relative coordinates, as the same units are used when calculating distances between two points, so diagonal dimensions are concerned as well. In practical terms, it is safer to keep the map boundaries between -20000 and +20000. Even limit removing ports do not generally raise this limit, since increasing it requires either moving to floating-point arithmetic or to 64-bit format. Sources * detailing vanilla Doom limits Category:Doom engine Category:Lists